1. Field of the Invention
This disclosure is generally related to the network design. More specifically, this disclosure is related to a method and apparatus for detecting frame delimiters in Ethernet Passive Optical Network (EPON) frames with Forward Error Correction (FEC) code.
2. Background Art
EPONs have become a popular candidate for next-generation access networks, because they offer the simplicity and scalability of Ethernet with the cost-efficiency and high capacity of passive optics. Typically, EPONs are used in the first mile of the network that connects service subscribers to a central office of a service provider. However, since EPONs adopt passive optical transmission technology, which does not involve amplification or regeneration, the size of a network is subject to power budget and various transmission impairments. As a result, the signal-to-noise ratio of an EPON suffers as the network increases its size, resulting in more frequent bit errors.
Forward error correction (FEC) techniques are often used to provide robustness against bit errors. With the FEC technique, a receiving device has the capability to detect and correct any block of symbols that contains fewer than a predetermined number of error symbols. A transmitting device accomplishes FEC by adding bits to each transmitted symbol block, using a predetermined error correction technique. One exemplary technique is the use of Reed-Solomon code. A Reed-Solomon code is specified as RS(l, k) with s-bit symbols, which means that the encoder takes k data symbols of s bits each, and adds (l−k) parity symbols to make an l-symbol codeword. A Reed-Solomon decoder can correct up to t symbols that contain errors in a codeword, where
2t=l−k. For example, RS(255, 239) with 8-bit symbols means that each codeword contains 255 bytes, of which 239 bytes are data and 16 bytes are parity. The decoder can automatically correct errors contained in up to 8 bytes anywhere in the codeword.
In order to ensure that FEC-coded Ethernet frames are backward-compatible (i.e. recognizable by non-FEC-capable equipments), IEEE 802.3ah Ethernet in the First Mile standard proposes that the FEC parity bits for all blocks of data symbols are aggregated and appended to a conventional Ethernet frame. A delimiter that can be recognized by a non-FEC-capable equipment delineates the conventional Ethernet frame from the parity bits. FIG. 1 illustrates an exemplary FEC-encoded Ethernet frame format. In this example, an FEC-coded Ethernet frame starts with a start code sequence 210 (called “SFEC”). Following SFEC is an Ethernet frame, which includes a preamble/start-of-frame delimiter (SFD) field 120, a data frame 130, and a frame-check-sequence (FCS) field 140. FCS field 140 typically contains a cyclic redundancy check (CRC) sequence. Following FCS field 140 is a first delimiter TFEC 150 indicating the end of the Ethernet frame. Another purpose of TFEC 150 is to delineate the Ethernet frame from the following FEC parity bits.
A byte of data is mapped to two 10-bit sequences (called “code groups”) in an EPON in order to maintain a balanced running disparity. For example, an octet of hexadecimal value 50 (01010000 in binary format) is mapped to code group 0110110101 and code group 1001000101. This pair of code groups is identified as “D16.2”. “D” indicates that this pair of code groups is used for data. “16” is the decimal value of the lower five bits of the octet (“10000”), and “2” is the decimal value of the higher three bits of the octet (“010”). Besides data code groups, there are also special code groups used for control purposes. For example, “K28.5” corresponds to code groups 0011111010 and 1100000101. Here, “K” indicates that it is a special code group, and “28.5” indicates the corresponding octet value. In addition, the IEEE 802.3 standard also defines special control sequences (called “ordered sets”). For example, ordered set /I1/ (/K28.5/D5.6/) is the IDLE ordered set. It is defined such that the running disparity at the end of the transmitted /I1/ is opposite to that of the beginning running disparity. The IDLE ordered set /I2/ (/K28.5/D16.2) is defined such that the running disparity at the end of the transmitted /I2/ is the same as the beginning running disparity. The first IDLE ordered set following a packet or a control sequence restores the current positive or negative running disparity to a negative value. All subsequent IDLEs are /I2/ to ensure a negative running disparity. Other ordered sets include /R/ (Carrier Extend, /K23.7/), /S/ (Start of Packet, /K27.8/), and /T/ (End of Packet, /K29.7).
According to the IEEE 802.3 standard (for non-FEC-coded Ethernet), an end-of-packet delimiter should be either /T/R/ or /T/R/R/. The reason for having two delimiters is to ensure that the code group that follows the delimiter falls in an even-numbered position. Therefore, /T/R/ is used when /T/ is in an even-numbered position, and /T/R/R/ is used when /T/ is in an odd-numbered position. Accordingly, as proposed in the IEEE 802.3ah standard, TFEC 150 has two sequences: TFEC_E (/T/R/I/T/R) to be used when the first /T/ is in an odd-numbered position, and TFEC_O (/T/R/R/I/T/R) to be used when the first /T/ is in an even-numbered position. Note that TFEC_E and TFEC_O include the conventional end-of-packet delimiter (/T/R/ and /T/R/R/, respectively). Therefore, a non-FEC-capable receiving device can recognize the end of an Ethernet packet. Following TFEC field 150 are the FEC parity bits 160. According to the current 802.3ah standard, FEC parity bits 160 are based on RS(255, 239) codes derived from the Ethernet frame and do not protect TFEC field 150 against bit errors. After the FEC parity bits is another TFEC field 170 which terminates the entire FEC-coded frame. Because the beginning of the parity bits is always in an even-numbered position due to TFEC 150, and because the total number of parity bits is always even, TFEC 170 uses only the TFEC_E sequence.
FIG. 2 illustrates the code-group sequence of delimiters TFEC_E and TFEC_O according to the current IEEE 802.3ah standard. Frame 210 uses an even TFEC delimiter, TFEC_E, as its delimiter between the conventional Ethernet frame and the FEC parity bits, because the first code group of the delimiter is in an even-numbered position. Frame 220 uses an odd TFEC delimiter, TFEC_O, as its delimiter between the conventional Ethernet frame and the FEC parity bits, because the first code group of the delimiter is in an odd-numbered position. In order to detect the delimiter, a receiving device scans the input stream of symbols for a match with TFEC_E or TFEC_O. Because the delimiter is not protected by FEC, a number of bit errors may be tolerated. According to the current IEEE 802.3ah standard, up to five bit errors are tolerated in the process of matching TFEC delimiters. Furthermore, the current IEEE 802.3 standard identifies the first sequence that has a shorter than 5-bit Hamming distance to TFEC delimiters as the TFEC. Because the /T/R/ pattern is repeated twice in the TFEC_E sequence, the TFEC_E sequence has a high auto-correlation. As a result, it is prone to mismatch the /T/R/ pattern in the TFEC_E sequence under the current IEEE 802.3 standard. The misidentification of TFEC_E will cause the receiver to misrecognize the end of the frame.